Skip to content

fix(deps): update dependency drizzle-orm to ^0.45.0 [security] - #1310

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-drizzle-orm-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/npm-drizzle-orm-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 8, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
drizzle-orm (source) ^0.44.5 → ^0.45.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Drizzle ORM has SQL injection via improperly escaped SQL identifiers

CVE-2026-39356 / GHSA-gpj5-g38j-94v9

More information

Details

Summary

Drizzle ORM improperly escaped quoted SQL identifiers in its dialect-specific escapeName() implementations. In affected versions, embedded identifier delimiters were not escaped before the identifier was wrapped in quotes or backticks.

As a result, applications that pass attacker-controlled input to APIs that construct SQL identifiers or aliases, such as sql.identifier(), .as(), may allow an attacker to terminate the quoted identifier and inject SQL.

Affected components

The issue affects the identifier escaping logic used by the PostgreSQL, MySQL, SQLite, SingleStore, and Gel dialects.

Impact

This issue only affects applications that pass untrusted runtime input into identifier or alias construction. Common examples include dynamic sorting, dynamic report builders, and CTE or alias names derived from request parameters.

Depending on the database dialect, query context, and database permissions, successful exploitation may enable blind or direct data disclosure, schema enumeration, query manipulation, privilege escalation, or destructive operations.

Applications that use only static schema objects, or that strictly map user input through an allowlist of known column or alias names, are not affected.

Details

In affected versions, escapeName() wrapped the identifier but did not escape the quote delimiter inside the identifier value:

  • PostgreSQL / SQLite / Gel: " was not doubled to ""
  • MySQL / SingleStore: ` was not doubled to ``

Because of this, crafted input containing the dialect-specific identifier delimiter could break out of the quoted identifier and be interpreted as SQL syntax.

A representative vulnerable pattern is dynamic sorting using untrusted input:

const sortField = req.query.sort || 'id';

const rows = await db
  .select()
  .from(users)
  .orderBy(sql.identifier(sortField));

#### Severity
- CVSS Score: 7.5 / 10 (High)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

#### References
- [https://github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9](https://redirect.github.com/drizzle-team/drizzle-orm/security/advisories/GHSA-gpj5-g38j-94v9)
- [https://nvd.nist.gov/vuln/detail/CVE-2026-39356](https://nvd.nist.gov/vuln/detail/CVE-2026-39356)
- [https://github.com/advisories/GHSA-gpj5-g38j-94v9](https://redirect.github.com/advisories/GHSA-gpj5-g38j-94v9)

This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-gpj5-g38j-94v9) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>drizzle-team/drizzle-orm (drizzle-orm)</summary>

### [`v0.45.4`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.45.4)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.45.3...0.45.4)

- Fixed `postgres-js` not using prepared queries on explicit `.prepare(name)`

### [`v0.45.3`](https://redirect.github.com/drizzle-team/drizzle-orm/releases/tag/0.45.3)

[Compare Source](https://redirect.github.com/drizzle-team/drizzle-orm/compare/0.45.2...0.45.3)

#### New Netlify DB Driver

> Note: The Netlify DB driver is developed and maintained by the Netlify team.

**Installation:**

```bash
npm i @netlify/db

Usage example:

import { drizzle } from 'drizzle-orm/netlify-db';

// reads NETLIFY_DB_URL and NETLIFY_DB_DRIVER env vars
const db = drizzle();

const result = await db.execute('select 1');
import { drizzle } from 'drizzle-orm/netlify-db';

const db = drizzle(process.env.DATABASE_URL);

const result = await db.execute('select 1');
import { drizzle } from 'drizzle-orm/netlify-db';

// Explicit client — consumer controls the driver
const db = drizzle({ client: netlifyDbClient });

const result = await db.execute('select 1');

v0.45.2

Compare Source

  • Fixed sql.identifier(), sql.as() escaping issues. Previously all the values passed to this functions were not properly escaped
    causing a possible SQL Injection (CWE-89) vulnerability

Thanks to @​EthanKim88, @​0x90sh and @​wgoodall01 for reaching out to us with a reproduction and suggested fix

v0.45.1

Compare Source

  • Fixed pg-native Pool detection in node-postgres transactions breaking in environments with forbidden require() (#​5107)

v0.45.0

Compare Source

  • Fixed pg-native Pool detection in node-postgres transactions
  • Allowed subqueries in select fields
  • Updated typo algorythm => algorithm
  • Fixed $onUpdate not handling SQL values (fixes #​2388, tests implemented by L-Mario564 in #​2911)
  • Fixed pg mappers not handling Date instances in bun-sql:postgresql driver responses for date, timestamp types (fixes #​4493)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from e5534c7 to bd92bca Compare April 8, 2026 17:44
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 8, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from bd92bca to ebb0bbf Compare April 8, 2026 23:37
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 8, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from ebb0bbf to 269c6d2 Compare April 14, 2026 12:13
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 14, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 269c6d2 to ebf635e Compare April 14, 2026 12:22
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 14, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from ebf635e to 67a66cb Compare April 14, 2026 14:29
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 14, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 67a66cb to c078fff Compare April 14, 2026 16:45
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 14, 2026
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 15, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from c078fff to 2dca57e Compare April 15, 2026 05:56
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 16, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch 2 times, most recently from 8019817 to 84314aa Compare April 16, 2026 15:48
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 16, 2026
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 16, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 84314aa to b92b2d3 Compare April 16, 2026 23:38
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 17, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from b92b2d3 to d52fb5b Compare April 17, 2026 11:07
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 17, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch 2 times, most recently from 149e6f4 to f770f66 Compare April 28, 2026 10:04
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 28, 2026
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 28, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from f770f66 to e830b21 Compare April 28, 2026 10:06
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 29, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch 2 times, most recently from f1c946d to 2cb3702 Compare April 29, 2026 11:54
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 29, 2026
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 29, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 2cb3702 to 4562ad2 Compare April 29, 2026 13:15
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 29, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 4562ad2 to b64eb47 Compare April 29, 2026 13:18
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 29, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from b64eb47 to 791c417 Compare April 29, 2026 14:05
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 29, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 791c417 to d79ef78 Compare April 29, 2026 14:06
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] Apr 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from d79ef78 to 1390844 Compare April 30, 2026 14:53
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] Apr 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 1390844 to 535cf72 Compare April 30, 2026 18:40
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] May 5, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch 2 times, most recently from 7b1a176 to 37ee2c3 Compare May 5, 2026 21:52
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] May 5, 2026
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.2 [security] fix(deps): update dependency drizzle-orm to ^0.45.0 [security] May 7, 2026
@renovate
renovate Bot force-pushed the renovate/npm-drizzle-orm-vulnerability branch from 37ee2c3 to 952097c Compare May 7, 2026 06:13
@renovate renovate Bot changed the title fix(deps): update dependency drizzle-orm to ^0.45.0 [security] fix(deps): update dependency drizzle-orm to ^0.45.2 [security] May 7, 2026
@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d4a40bde-d6c8-4ebc-b2cb-8f61eda99607

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants